package com.tuanzi.loan.business.service.receipt.statistics;

import com.tuanzi.loan.business.entity.receipt.statistics.ReceiptBalanceOperationRecord;
import com.tuanzi.loan.core.service.CommonService;
import com.tuanzi.loan.vo.view.receipt.statistics.ReceiptBalanceOperationRecordView;

import java.util.Date;
import java.util.List;

/**
 * @author lsx
 */
public interface ReceiptBalanceOperationRecordService extends CommonService<ReceiptBalanceOperationRecord, Integer> {
    /**
     * 取得用户的投递信息(不区分来源)
     *
     * @param userId
     * @return
     */
    ReceiptBalanceOperationRecordView findRecordResponseByUserId(String userId, Date startTime, Date endTime);

    /**
     * 查询用户投递信息，区分来源
     * @param userId
     * @param startTime
     * @param endTime
     * @return
     */
    List<ReceiptBalanceOperationRecordView> findRecordResponseSourceFromByUserId(String userId, Date startTime, Date endTime);


    /**
     * 查询时间之内的该产品的该来源所花费的金额
     * @param productId
     * @param sourceFrom
     * @param startTime
     * @param endTime
     * @return
     */
    Long findSettleAmountByProductIdAndSourceFrom(Long productId, Integer sourceFrom, Date startTime, Date endTime);

}
